Skip to content

replace assert() with error handling, fix memory leaks and correctness bugs - #93

Open
rafaelvanoni wants to merge 12 commits into
nextfrom
tmerged-investigation
Open

replace assert() with error handling, fix memory leaks and correctness bugs#93
rafaelvanoni wants to merge 12 commits into
nextfrom
tmerged-investigation

Conversation

@rafaelvanoni

@rafaelvanoni rafaelvanoni commented Aug 14, 2026

Copy link
Copy Markdown

These changes came from the tmerged investigation and the intention to harden mtbl_merge and keep it from silently failing.

@rafaelvanoni rafaelvanoni self-assigned this Aug 14, 2026
@rafaelvanoni
rafaelvanoni force-pushed the tmerged-investigation branch 2 times, most recently from 7e2172f to 3524c8b Compare August 14, 2026 08:57
@rafaelvanoni
rafaelvanoni force-pushed the tmerged-investigation branch from 3524c8b to da48c4e Compare August 14, 2026 09:11
@rafaelvanoni rafaelvanoni changed the title tmerged investigation replace assert() with error handling, fix memory leaks and correctness bugs Aug 18, 2026
@rafaelvanoni
rafaelvanoni marked this pull request as ready for review August 18, 2026 22:01
@rafaelvanoni
rafaelvanoni requested review from cmikk and shw700 August 18, 2026 22:01
@rafaelvanoni
rafaelvanoni force-pushed the tmerged-investigation branch 2 times, most recently from 4904878 to 510fce0 Compare August 19, 2026 22:14
@rafaelvanoni
rafaelvanoni force-pushed the tmerged-investigation branch from 510fce0 to bdfbc95 Compare August 19, 2026 22:21
Comment thread mtbl/reader.c Outdated
fd = open(fname, O_RDONLY);
if (fd < 0)
if (fd < 0) {
fprintf(stderr, "%s: ERROR: failed to open(2) '%s': %s\n", __func__, fname, strerror(errno));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is library code. Libraries should not be writing to stdout/stderr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants